<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<script type="text/javascript">
	$(document).ready(function(){
		$("ul li:eq(0)").addClass("active");
	});
	
	
	function check(){
	// var title = $("#title"); 
	  var title =document.getElementById("title").value; 
	var text=document.getElementById("tt").value; 
	
	if(title == null || title == ""){
	document.getElementById("error").innerHTML = "请输入标题";
	//alert("请输入标题");
	return false;
	}
	if(text == null || text == ""){
	document.getElementById("error").innerHTML = "请输入消息内容";
	
	return false;
	}
	
	 document.f.action="intoinfo";
	
	return true;
	
	}
</script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body>
	<center>

<table border="0" width="90%"  cellspacing="0" cellpadding="5">
            <tr height="35"><td style="text-indent:5" valign="bottom"><font color="#004790"><b>■信息一览</b></font></td>
           
            </tr>
              <tr height="15">
           <td style="text-indent:5" valign="bottom" align="right"><font color="#004790"><a href="blank?action=all">查看更多>></a></font></td>
               </tr>
            <tr bgcolor="#FAFCF5">
                <td style="border:1 solid">
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                                  <tr height="35">  
                            	<c:forEach  varStatus="i" var="info" begin="0" step="1" end="8" items="${infolist }"> 
                            	
                            	 
                             <td width="50%"<c:if test="${info.type==1}">bgcolor="#CCCCFE"</c:if>>
                                 『${info.date}』--<a href="info?id=${info.id}">${info.title} </a></td>
                                
                            <c:if test="${i.count%2==0 && i.count<9}"><tr height="35"></c:if>
                              	
                                  </c:forEach>  <td width="50%">...</td>
                                   </tr>      
                    </table>
                </td>
            </tr>
  </table>
   <table width="90%" border="0" cellspacing="0" cellpadding="0" style="margin-top:5">
            <tr height="30"><td style="text-indent:5" valign="bottom"><font color="#004790"><b>■发布信息</b></font></td></tr>            
          
              <tr height="15">
           <td ></td>
               </tr>
            <tr height="1"><td></td></tr>
            <tr bgcolor="#FAFCF5">
                <td style="border:1 solid">
                <form name="f" onsubmit="return  check()" method="post">
                    <table border="0" width="100%" cellspacing="0" cellpadding="2">
                     <tr height="40">
                               
                              
                            </tr>
                 <tr height="40">
                                <td style="text-indent:20" align="right">信息标题：</td>
                                <td width="100" ><input type="text" id="title" name="title" style="width:500px;height: 30px;" class="input-medium search-query"/>
                                <span id=error></span>
                                 </td>
                                
                            </tr>
                             <tr>
                             
                            
                             
                           
                            </tr>
                            <tr height="40">
                            <td style="text-indent:10" align="right">信息内容：</td>
                             <td colspan="2" align="left">
                                   
                                     <table border="1" width="80%" cellspacing="0" cellpadding="10" rules="none" frame="below" style="word-break:break-all" bordercolor="lightgrey" bordercolorlight="lightgrey" bordercolordark="white">
                                        <tr height="200" bgcolor="white"><td colspan="3" >
                                        <textarea rows="0" cols="0"  style="width:900px;height: 230px;" id="tt" name="tt"> </textarea>  
                                        </td></tr>
                                        <tr height="20" align="center">
                                            <td>楼栋：${buildName }</td>
                                            <td>管理员：${name }</td>
                                            <td>日期时间：${tm }<input type="hidden" name="tm" value="${tm }"/></td> 
                                        </tr>
                                        
                                    
                                    </table>                     
                                </td>
                            </tr>
                           
                            <tr height="33">
                            <td>
                            
                            </td>
                            <td align="left">  
	</td>
                           </tr>                              
                        
                    </table>
                    <CENTER>	<input class="btn btn-info" type="submit" value="确定" />
	&nbsp;&nbsp;
	<input class="btn btn-info" type="reset" value="重置">
	&nbsp;&nbsp;
	<input class="btn btn-info" type="button" onclick="javascript:window.history.back(-1)" value="返回">
	</CENTER>
                    </form>
                </td>
            </tr>
        </table>
        <br>
</center>
</body>